package com.scud.system.mapper;

import com.scud.model.system.dto.AssignRoleDto;
import com.scud.model.system.pojo.UserRole;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author vermouth
 */
@Mapper
public interface UserRoleMapper {
    //根据用户id查询数据
    List<UserRole> selectByUserId(Long userId);

    void insert(UserRole userRole);

    //根据角色id获取用户id
    List<Long> selectUserIdByRoleId(Integer roleId);

    void deleteByUserId(Long userId);

    void assign(AssignRoleDto assignDto);

    void deleteByRoleId(Long roleId);

    List<Long> getRoleIdsByUserId(Long userId);
}
